<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
<meta name="description" content="">
<meta name="author" content="">

<!-- Note there is no responsive meta tag here -->

<link rel="icon" href="static/favicon.ico">

<title>登陆-沈阳国安订阅号</title>

<!-- Bootstrap core CSS -->
<link href="${ctx}/static/css/bootstrap.min.css" rel="stylesheet">
<link href="${ctx}/static/css/bootstrap-theme.css" rel="stylesheet">
<link href="${ctx}/static/css/font-awesome.css" rel="stylesheet">
<link href="${ctx}/static/css/webCustomer/login.css" rel="stylesheet">

<!-- Custom styles for this template -->
<link href="${ctx}/static/css/non-responsive.css" rel="stylesheet">

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
    <script src="static/js/polyfill/html5shiv.min.js"></script>
    <script src="static/js/polyfill/respond.min.js"></script>
    <![endif]-->

<!-- Bootstrap core JavaScript -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="${ctx}/static/js/jquery.min.js"></script>
<script src="${ctx}/static/js/bootstrap.min.js"></script>

<script
	src="${ctx}/static/plugin/jquery-validation/jquery.validate.min.js"></script>
<script src="${ctx}/static/plugin/jquery-validation/messages_zh.js"></script>
<script src="${ctx}/static/plugin/jquery-form/jquery.form.js"></script>

<script src="${ctx}/static/js/common/base.js"></script>

</head>

<body>
	<div class="login_main">
		<div class="mod_basic">
			<div class="title">
				<h3>欢迎登陆沈阳国安驾校订阅号</h3>
			</div>
		</div>
		<div class="content">
			<div class="sub_content">
				<form class="form-horizontal" id="login_form" method="post">
					<div class="form-group">
						<label class="col-sm-4 control-label">登陆帐户：</label>
						<div class="col-sm-8">
							<input type="text" class="form-control" id="uname" name="uname">
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-4 control-label">登陆密码：</label>
						<div class="col-sm-8">
							<input type="password" class="form-control" id="upass"
								name="upass">
						</div>
					</div>
					<div class="form-group">
						<button type="submit" class="btn btn-primary btn-block">进入系统</button>
					</div>
				</form>
			</div>
		</div>
	</div>

</body>
<script>
	$().ready(function() {
		base.form.validation_init();
		base.form.validation("#login_form",{
			rules : {
				uname : {
					required : true,
					minlength : 2
				},
				upass : {
					required : true,
					minlength : 5
				}
			},
			messages : {
				uname : {
					required : "请输入您的登陆帐户",
					minlength : "登陆帐户必须两个字符以上"
				},
				upass : {
					required : "请输入您的登陆密码",
					minlength : "登陆密码必须5个字符以上"
				}
			}
		});
		base.form.ajaxSubmit({formid:'#login_form'}, function(data) {
			if (data != null && data != "") {
				if(data.status!=1){
					alert(data.msg);
				}else{
					if(data.data == true){
						 window.location.href="${ctx}/webCustomer/exam/index"; 
					}
				}
			}
		});
	});
</script>

</html>
